/**
 * Ajax plug in Script start
 */
(function ( $ ) {
	
	/**
	 * extend $.fn
	 */
	$.extend($.fn, {
		hajax : function(options) {
			var config = {
				//data:JSON.stringify(options.data),
				type: "POST",
				dataType: 'json',
				headers: { 
					'Accept': 'application/json',
					'Content-Type': 'application/json' 
				}
			};
			
			var conf = $.extend(config, options);
			
			if( conf.data != null ){
				conf.data = JSON.stringify(conf.data);
			}else{
				conf.data = JSON.stringify({});
			}
			
			console.log( conf );
			
			return $.ajax(conf);
		}
	});	

}
)(jQuery);
/**
 * Ajax plug in Script end
 */


